cmake_minimum_required(VERSION 3.10)

project(opengl_tutorial)

add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/source-charset:utf-8>")

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG 	
${CMAKE_SOURCE_DIR}/output
)

# GLFW 
set(GLFW_LIB 
glfw3.lib

)

link_directories(packages/glfw-3.3.7/lib-vc2022/)
link_libraries(${GLFW_LIB})

# Assimp
set(Assimp_LIB 
assimp-vc143-mtd.lib

)

link_directories(packages/assimp/)
link_libraries(${Assimp_LIB})

# 包含头文件
include_directories(include/)
include_directories(packages/glfw-3.3.7/include)
include_directories(packages/glad/include)
include_directories(packages/stb_image)
include_directories(packages/glm)
include_directories(packages/assimp/include)



add_subdirectory(src/cpp/sample)
add_subdirectory(src/cpp/engine)

# 复制资源文件到输出目录
# add_custom_command(TARGET project PRE_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy_directory
# ${CMAKE_SOURCE_DIR}/assets $<TARGET_FILE_DIR:project>/assets
# )
